package lhdx10;

public class PassengerCar extends Automobile {
    public PassengerCar(String type,String brand,String plateNumber,int seat,double dailyRent,boolean state){
        super(type, brand,plateNumber,seat,dailyRent,state);
    }

    public PassengerCar() {
    }

    public double payment(int a) {
        if (a>=3&&a<7){
            return getDailyRent()*0.9*a;
        }
        if (a>=7&&a<30){
            return getDailyRent()*0.8*a;
        }
        if (a>=30&&a<150){
            return getDailyRent()*0.7*a;
        }
        if (a>=150){
            return getDailyRent()*0.6*a;
        }
        return getDailyRent()*a;
    }
    public void show(){
        super.show();
    }
}
